-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[quick_actions_ios] Migrate XCTest to Swift Testing #10767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request migrates the iOS quick actions plugin tests from XCTest to the new Swift Testing framework. The changes involve updating the test file QuickActionsPluginTests.swift to use the new @Test macros, #expect assertions, and async testing features. The project's Swift version is also updated to 6.0 to support Swift Testing.
The migration is well-executed. I have one suggestion to improve the robustness of an asynchronous test to better align with the original test's logic and be less dependent on the mock's implementation details.
packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/QuickActionsPluginTests.swift
Outdated
Show resolved
Hide resolved
ae30d6a to
88d4558
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request migrates the iOS quick actions example tests from XCTest to the new Swift Testing framework. The changes are generally correct and follow the new testing patterns. I've identified a few areas for improvement in the test file: some assertion messages that were present in the original tests have been lost, and one test can be made more robust to match its descriptive name. My detailed comments provide suggestions to address these points.
packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/QuickActionsPluginTests.swift
Show resolved
Hide resolved
packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/QuickActionsPluginTests.swift
Show resolved
Hide resolved
packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/QuickActionsPluginTests.swift
Outdated
Show resolved
Hide resolved
fdfa666 to
a0b82f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request successfully migrates the quick_actions_ios plugin's tests from XCTest to the new Swift Testing framework. The changes involve updating the Swift version and replacing XCTest APIs with their Swift Testing equivalents like @Test, #expect, and await confirmation. The test logic is correctly preserved, and in one case, improved for better correctness. My feedback is focused on enhancing the readability of the new test function names for better maintainability.
packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/QuickActionsPluginTests.swift
Show resolved
Hide resolved
packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/QuickActionsPluginTests.swift
Show resolved
Hide resolved
packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/QuickActionsPluginTests.swift
Show resolved
Hide resolved
flutter/packages@1cb2148...cd4fd61 2026-01-28 magder@google.com [quick_actions_ios] Migrate XCTest to Swift Testing (flutter/packages#10767) 2026-01-28 43054281+camsim99@users.noreply.github.com [camera_android_camerax] Improve documentation on `cameraId` parameter (flutter/packages#10844) 2026-01-28 43054281+camsim99@users.noreply.github.com [camera_android_camerax] Improve error messages when image capture fails (flutter/packages#10846) 2026-01-28 j.calvin.ren@gmail.com [image_picker] Transparent pressing on iOS 26 (#173453) (flutter/packages#10533) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#181663) flutter/packages@1cb2148...cd4fd61 2026-01-28 magder@google.com [quick_actions_ios] Migrate XCTest to Swift Testing (flutter/packages#10767) 2026-01-28 43054281+camsim99@users.noreply.github.com [camera_android_camerax] Improve documentation on `cameraId` parameter (flutter/packages#10844) 2026-01-28 43054281+camsim99@users.noreply.github.com [camera_android_camerax] Improve error messages when image capture fails (flutter/packages#10846) 2026-01-28 j.calvin.ren@gmail.com [image_picker] Transparent pressing on iOS 26 (flutter#173453) (flutter/packages#10533) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Part of flutter/flutter#180787
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8692855180982743569/+/u/Run_package_tests/native_test/stdout
Adding CHANGELOG override per #10761 (comment)
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3